<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="供货关系列表" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addData()"
                            ng-disabled="!btnPermission.supplierAdd"
                            translate translate-attr-title="{{!btnPermission.supplierAdd?'无权限执行此操作':''}}">新增</button>
                    <!-- <button class="btn btn-operate m-r-sm" ng-click="bound()"
                            ng-disabled="!btnPermission.supplierBind"
                            translate translate-attr-title="{{!btnPermission.supplierBind?'无权限执行此操作':''}}">绑定</button> -->
                    <button class="btn btn-operate m-r-sm" ng-click="delData('batch')"
                            ng-disabled="!btnPermission.supplierDel"
                            translate translate-attr-title="{{!btnPermission.supplierDel?'无权限执行此操作':''}}">删除</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="供货商名称"
                               ng-model="condition.companyName">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>供货商代码</span>：</label>
                        <input type="text" ng-model="condition.supplierCode" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>简称</span>：</label>
                        <input type="text" name="shortName" ng-model="condition.shortName" class="form-control">
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="true"
                 has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="th-check text-center border-l-none">
                                    <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll()"></div>
                                </th>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tbConf.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.fixedWidth" fixed-width="tbStyle.scrollLeft"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tbConf.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-style="tbStyle.scrollLeftWidth">
                        <table class="table-fixed border-none">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td width="45" class="text-center border-l-none">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item)"></div>
                                </td>
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed" title="{{item[itemCol.dataField]}}">
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button class="btn btn-operate m-r-xs" ng-click="editData(item)"
                                                ng-disabled="!btnPermission.supplierEdit"
                                                translate translate-attr-title="{{!btnPermission.supplierEdit?'无权限执行此操作':''}}">编辑</button>
                                        <button class="btn btn-operate m-r-xs" ng-click="delData('single', item.id)"
                                                ng-disabled="item.isPlatCompany||item.applyStatus == 5 || !btnPermission.supplierDel"
                                                translate translate-attr-title="{{!btnPermission.supplierDel?'无权限执行此操作':''}}">删除</button>
                                        <button class="btn btn-operate m-r-xs" ng-click="viewWarehouseStock(item.supplierOrgId)" translate>仓库库存</button>
                                        <button class="btn btn-operate m-r-xs" ng-click="viewCustomerStock(item.supplierOrgId)" translate>客户库存</button>
                                        <button class="btn btn-operate m-r-xs" ng-click="viewPriceStock(item)"  ng-if="item.showPriceBtn"
                                                translate translate-attr-title="{{!btnPermission.priceStock?'无权限执行此操作':''}}" 
                                                ng-disabled="!btnPermission.priceStock">价格查询</button>
                                        <button class="btn btn-operate" ng-click="invite(item.id)"
                                                ng-disabled="item.isPlatCompany||item.applyStatus == 3 || !btnPermission.supplierInvite"
                                                translate translate-attr-title="{{!btnPermission.supplierInvite?'无权限执行此操作':''}}">邀请</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选" yb-click="selectAll()"></div>
                <button class="btn btn-operate" ng-click="delData('batch')"
                        ng-disabled="!btnPermission.supplierDel"
                        translate translate-attr-title="{{!btnPermission.supplierDel?'无权限执行此操作':''}}">删除</button>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <form name="form" class="form-horizontal wrapper-md clearfix" novalidate>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span translate>供货商分类</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <select name="supplierClass" class="form-control" ng-model="detailInfo.supplierClassId"
                            required yb-focus ng-change="clearCompany()" ng-disabled="tabFlag.type==1&&(detailInfo.isPlatCompany||detailInfo.applyStatus == 5)">
                            <option value="">请选择</option>
                            <option value="11">供应商供货</option>
                            <option value="22" ng-if="curOrg.companyType==33">外协仓供货</option>
                        </select>
                    </div>
                    <div class="col-xs-4 msg-block"
                         ng-show="form.supplierClass.$dirty || (form.supplierClass.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.supplierClass.$error.required && !form.supplierClass.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>供货商代码：</label>
                        <div class="col-xs-5 wrapper-none">
                            <div name="supplierCode" yb-form-clear
                                    ng-model="detailInfo.supplierCode"
                                    title="detailInfo.supplierCode"
                                    select-obj="selectCompany()"
                                    clear-form="clearCompany()"
                                    tips-name="供货商"
                                    form-require="true"
                                    input-disabled="tabFlag.type==1&&(detailInfo.isPlatCompany||detailInfo.applyStatus == 5)"></div>
                        </div>
                        <div class="col-xs-4 msg-block" ng-if="!detailInfo.supplierCode && submitted">
                            <div class="error-msg">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span translate>供货商名称</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="companyName" class="form-control" ng-model="detailInfo.companyName"
                               required yb-focus maxlength="50">
                    </div>
                    <div class="col-xs-4 msg-block"
                         ng-show="form.companyName.$dirty || (form.companyName.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.companyName.$error.required && !form.companyName.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>供货商简称</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="shortName" class="form-control" ng-model="detailInfo.shortName" maxlength="20">
                    </div>
                </div>
                
                
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>地址</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="address" class="form-control" ng-model="detailInfo.address" maxlength="200">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>联系人</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="contact" class="form-control" ng-model="detailInfo.contact" maxlength="20">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>联系方式</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="contactTel" class="form-control" ng-model="detailInfo.contactTel"
                               yb-contact yb-focus>
                    </div>
                    <div class="col-xs-4 msg-block"
                         ng-show="form.contactTel.$dirty || (form.contactTel.$invalid&&submitted)">
                        <div class="error-msg" ng-show="form.contactTel.$error.contactInfo && !form.contactTel.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>请输入正确的手机号码或电话号码</span>
                        </div>
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>传真</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="fax" class="form-control" ng-model="detailInfo.fax" maxlength="15">
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>邮编</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="zip" class="form-control" ng-model="detailInfo.zip" maxlength="15">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-xs-offset-2">
                        <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)" translate>保存
                        </button>
                        <button type="button" class="btn btn-default" ng-click="changeTab(0)" translate>取消</button>
                    </div>
                </div>
            </form>
        </div>
        <div tab heading="绑定" active="activeFlag[2]" ng-if="activeFlag[2]">
            <div class="main-area d-t-35 d-b-60">
                <form name="boundForm" class="main-wrap form-horizontal single-col p-t-md clearfix" novalidate>
                    <div class="form-group border-b p-b-md">
                        <label class="col-xs-2 control-label"><i>*</i><span translate>邀请码</span>：</label>
                        <div class="col-xs-4 wrapper-none">
                            <input type="text" name="invitationCode" class="form-control" ng-model="boundObj.invitationCode"
                                   required yb-focus>
                        </div>
                        <div class="col-xs-1 wrapper-none p-l-sm">
                            <button class="btn btn-primary w-full" ng-click="getInfo(boundForm.$valid)" translate>搜索</button>
                        </div>
                        <div class="col-xs-4 msg-block" ng-show="boundForm.invitationCode.$dirty || (boundForm.invitationCode.$invalid && submitted)">
                            <div class="error-msg" ng-if="boundForm.invitationCode.$error.required && !boundForm.invitationCode.focused">
                                <i class="yb-icon ico-times-circular"></i><span translate>请输入合法的邀请码</span>
                            </div>
                        </div>
                    </div>
                    <div ng-if="!!orgInfo.orgId">
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>组织机构代码</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.orgCode}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>企业名称</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.companyName}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>企业简称</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.shortName}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>渠道</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.channelDesc}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>地址</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.address||'-'}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>联系人</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.contact||'-'}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>联系电话</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.contactTel||'-'}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>传真</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.fax||'-'}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>创建日期</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.createDate|YbDate}}
                            </label>
                        </div>
                    </div>
                </form>
            </div>
            <div class="bottom-area btn-bar single-col border-t clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-disabled="!orgInfo.orgId" ng-click="doBound(boundForm.$valid)" translate>绑定</button>
                <button type="button" class="btn btn-default" ng-click="changeTab(0)" translate>取消</button>
            </div>
        </div>
        <div tab heading="仓库库存" active="activeFlag[3]" ng-if="activeFlag[3]">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0"></div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="warehouseStock.search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="warehouseStock.switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="warehouseStock.switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="零件中文名/零件编号"
                               ng-model="warehouseStock.condition.materialName">
                        <span class="input-group-addon cursor-pointer" ng-click="warehouseStock.search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="warehouseStock.toolbarConfig.showAdvanceSearch" search-data="warehouseStock.search(1)" reset-data="warehouseStock.reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件中文名</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="零件中文名" ng-model="warehouseStock.condition.materialName">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件编号</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="零件编号" ng-model="warehouseStock.condition.materialNo">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件分类</span>：</label>
                        <div ng-model="warehouseStock.condition" materiel-class-selector supplier-org-id="warehouseStock.supplierOrgId" class="sm-size lh-12-20"></div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>仓库编码</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="仓库编码" ng-model="warehouseStock.condition.warehouseCode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>库区</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="库区" ng-model="warehouseStock.condition.areaCode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>储位</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="储位" ng-model="warehouseStock.condition.locationCode">
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="warehouseStock.toolbarConfig.showColConfig" ng-model="warehouseStock.tableConfig" col-fixed="true" set-tb-style="warehouseStock.setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{warehouseStock.tableConfig.fixedWidth}}">
                            <thead>
                            <tr>
                                <th class="border-l-none" ng-repeat="itemCol in warehouseStock.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="warehouseStock.toSort(warehouseStock.tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="warehouseStock.tableConfig.fixedWidth" fixed-width="warehouseStock.tbStyle.billFixedWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="warehouseStock.tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{warehouseStock.tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in warehouseStock.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="warehouseStock.toSort(warehouseStock.tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="warehouseStock.tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="warehouseStock.dataList.length > 0">
                        <table class="table-fixed border-none" width="{{warehouseStock.tableConfig.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in warehouseStock.dataList track by $index" ng-class="{'row-selected': $index === warehouseStock.markInfo.cueRow}"
                                ng-click="warehouseStock.selectRow($index)">
                                <td class="spill-dots border-l-none" ng-repeat="itemCol in warehouseStock.tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="warehouseStock.tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="warehouseStock.dataList.length > 0" ng-style="warehouseStock.tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{warehouseStock.tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in warehouseStock.dataList track by $index" ng-class="{'row-selected': $index === warehouseStock.markInfo.cueRow}"
                                ng-click="warehouseStock.selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in warehouseStock.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="warehouseStock.tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="warehouseStock.dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="warehouseStock.pageInfo" yb-refresh="warehouseStock.search()"></div>
            </div>
        </div>
        <div tab heading="客户库存" active="activeFlag[4]" ng-if="activeFlag[4]">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0"></div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="customerStock.search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="customerStock.switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="customerStock.switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <div yb-form-clear ng-model="customerStock.condition.orgName" select-obj="customerStock.selectDealer()"
                             clear-form="customerStock.clearDealer()" tips-name="客户" form-require="true"></div>
                        <span class="input-group-addon cursor-pointer" ng-click="customerStock.search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="customerStock.toolbarConfig.showAdvanceSearch" search-data="customerStock.search(1)" reset-data="customerStock.reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件编号</span>：</label>
                        <textarea ng-model="customerStock.condition.materialsNos" class="form-control" translate translate-attr-placeholder="逗号分隔或者换行分隔" >
                        </textarea>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件中文名</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="零件中文名" ng-model="customerStock.condition.materialName">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>仓库编码</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="仓库编码" ng-model="customerStock.condition.warehouseCode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>库区</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="库区" ng-model="customerStock.condition.areaCode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>储位</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="储位" ng-model="customerStock.condition.locationCode">
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="customerStock.toolbarConfig.showColConfig" ng-model="customerStock.tableConfig" col-fixed="true" set-tb-style="customerStock.setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{customerStock.tableConfig.fixedWidth}}">
                            <thead>
                            <tr>
                                <th class="border-l-none" ng-repeat="itemCol in customerStock.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="customerStock.toSort(customerStock.tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="customerStock.tableConfig.fixedWidth" fixed-width="customerStock.tbStyle.billFixedWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="customerStock.tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{customerStock.tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in customerStock.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="customerStock.toSort(customerStock.tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="customerStock.tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="customerStock.dataList.length > 0">
                        <table class="table-fixed border-none" width="{{customerStock.tableConfig.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in customerStock.dataList track by $index" ng-class="{'row-selected': $index === customerStock.markInfo.cueRow}" ng-click="customerStock.selectRow($index)">
                                <td class="spill-dots border-l-none" ng-repeat="itemCol in customerStock.tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="customerStock.tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="customerStock.dataList.length > 0" ng-style="customerStock.tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{customerStock.tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in customerStock.dataList track by $index" ng-class="{'row-selected': $index === customerStock.markInfo.cueRow}" ng-click="customerStock.selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in customerStock.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="customerStock.tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="customerStock.dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="customerStock.pageInfo" yb-refresh="customerStock.search()"></div>
            </div>
        </div>
        <div tab heading="价格查询" active="activeFlag[5]" ng-if="activeFlag[5]">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0"></div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="PriceStock.search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <div class="btn btn-default base-color" ng-if="btnPermission.supplierPriceStockExport||btnPermission.supplierPriceStockExportAll">
                            <div title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl" ng-if="btnPermission.supplierPriceStockExport"
                                    download-param="exportParam.sectionParam" download-key="list" is-ajax="true">
                                    <i class="yb-icon ico-export-o"></i> 导出
                                </li>
                                <li yb-download download-url="exportParam.allUrl" ng-if="btnPermission.supplierPriceStockExportAll" is-ajax="true"
                                    download-param="AllExport" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> 导出全部
                                </li>
                            </ul>
                        </div>                            
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="PriceStock.switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="零件编号"
                               ng-model="PriceStock.condition.materialsNo" ng-blur="changeExport()">
                        <span class="input-group-addon cursor-pointer" ng-click="PriceStock.search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="PriceStock.toolbarConfig.showAdvanceSearch" search-data="PriceStock.search(1)" reset-data="PriceStock.reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件中文名</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="零件中文名" ng-model="PriceStock.condition.materialsDesc"  ng-blur="changeExport()">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件编号</span>：</label>
                        <!-- <textarea  class="form-control" translate translate-attr-placeholder="逗号分割或者换行分割" ng-model="PriceStock.condition.materialsNos"> -->
                            <textarea ng-model="PriceStock.condition.materialsNs" class="form-control" translate translate-attr-placeholder="逗号分隔或者换行分隔" ng-blur="changeExport()"></textarea>

                    </div>
                </div>
            </div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x" ng-style="PriceStock.tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{PriceStock.tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="text-center th-check border-l-none">
                                    <div yb-check-box yb-checked="PriceStock.markInfo.allCheckedBill"
                                        yb-click="PriceStock.selectAll(PriceStock.dataList, 'Bill')"></div>
                                </th>                                   
                                <th ng-repeat="itemCol in PriceStock.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="PriceStock.toSort(PriceStock.tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="PriceStock.tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="PriceStock.dataList.length > 0" ng-style="PriceStock.tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{PriceStock.tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in PriceStock.dataList track by $index" ng-class="{'row-selected': $index === PriceStock.markInfo.cueRow}"
                                ng-click="PriceStock.selectRow($index)">
                                <td width="40" class="text-center border-l-none">
                                    <div yb-check-box yb-checked="item.isChecked"
                                        yb-click="selectSingleLack(item, PriceStock.dataList, 'Bill')"></div>
                                </td>                                  
                                <td class="spill-dots" ng-repeat="itemCol in PriceStock.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="PriceStock.tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="PriceStock.dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="PriceStock.pageInfo" yb-refresh="PriceStock.search()"></div>
            </div>
        </div>
    </div>
</div>
